<div class="noidung">

<a href="<?php echo $this->url(array("controller"=>"author","action"=>"add")) ?>" >Insert New author</a>
<table id="rounded-corner" summary="007 Major IT Companies' Profit">
    <thead>
    	<tr>
        	<th scope="col" class="rounded"> Author ID </th>
            <th scope="col" class="rounded" style="width: 200px;">  Name</th>
            <th scope="col" class="rounded">Age  </th>
            <th scope="col" class="rounded">Action</th>
        </tr>
    </thead>
      
    <tbody>
    
    <?php if(isset($this->authors)):foreach($this->authors as $author):; ?>
       	 <tr>
             <td><?=$author["au_id"];?></td>
        	 <td><?php echo $author["au_name"];?></td>
            <td><?php echo $author["au_age"];?></td>
			<td>
            <a href="<?php echo $this->url(array("controller"=>"author","action"=>"detail","author"=>$author["au_id"]));// $this->baseUrl("index/detail/id/".$book["bk_id"]);?>">View Details</a> | 
            <a href="<?php echo $this->url(array("controller"=>"author","action"=>"edit","author"=>$author["au_id"]));?>"><img border="0" src="<?php echo $this->DirImg;?>/user_edit.png" /></a>
           <a rel="delete"  href="<?php echo $this->url(array("controller"=>"author","action"=>"delete","author"=>$author["au_id"]));?>" class="ask"  ><img border="0" src="<?php echo $this->DirImg;?>/trash.png" /></a>
           </td>
        </tr>
       <?php endforeach;endif; ?>  


    </tbody>
</table>
<script>
   $("a[rel=delete]").click(function(){
   return window.confirm("Delete author will delete all his/her books,Are you sure want to continutes ?");
})  
</script>
